//
//  JHUHospital.h
//  iHealthEHR
//
//  Created by Joseph Ayo Akinyele on 3/29/10.
//  Copyright 2010 Johns Hopkins University. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "XMLParser.h"
#import "GDataXMLNode.h"
#import "CCRObject.h"
#import "UserSettings.h"

@interface JHUHospital : NSObject {
	NSData *xmlData, *privateKey;
	NSString *username, *password, *dataLink;
	NSMutableDictionary *ccrEntries;
	NSDictionary *ccrMap;
}

//@property (nonatomic, retain) NSURL *service;
@property (nonatomic, retain) NSData *xmlData, *privateKey;
@property (nonatomic, retain) NSString *dataLink;
@property (nonatomic, retain) NSMutableDictionary *ccrEntries;

-(id) init;
-(BOOL) authenticateWithHTTP:(NSString *) user andPass: (NSString *) pass;
-(BOOL) authenticateWithHTTPS:(NSString *) user andPass: (NSString *) pass;
-(void) downloadXML;
-(void) deconstructDoc:(NSXMLDocument *) document;
-(NSXMLElement *) constructCCREntry:(NSString *) container withNode:(NSXMLNode *) tree;
// -(NSString *) extractText:(NSXMLNode *) node;

// -(void) downloadKey;
// -(NSDictionary *) deconstructXML;
@end
